package com.weimob.demo;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext;

import com.weimob.demo.configuration.AppProperties;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@SpringBootApplication
@EnableCaching //标注启动缓存.
@MapperScan(value={"com.weimob.demo.admin.persistent.mapper"})
@EnableConfigurationProperties(AppProperties.class)
public class Application {

	public static void main(String[] args) {
		ApplicationContext ctx = SpringApplication.run(Application.class, args);
		String[] activeProfiles = ctx.getEnvironment().getActiveProfiles();  
		for (String profile : activeProfiles) {  
	        log.warn("Spring Boot 使用profile为:{}" , profile);  
	    }
	}
}
